import { apiPrefix } from '@/consts/consts'

export default ({ $service:request }) => ({

  customerList(params) {
    return request({
      url: `${apiPrefix}/api/v1/customer/list`,
      method: 'get',
      params
    })
  },


  customerAdd(data) {
    return request({
      url: `${apiPrefix}/api/v1/customer/add`,
      method: 'post',
      data
    })
  },
  

  customerUpdate(data, customer_id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/update/${customer_id}`,
      method: 'put',
      data
    })
  },
    

  customerDelete(customer_id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/delete/${customer_id}`,
      method: 'delete',
    })
  },

})
